package com.cn.study0011.Test004;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName TestSco.java
 * @Description
 * @createTime 2023年05月16日 17:29:00
 */
public class TestSco {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        ScoreCalc scoreCalc=new ScoreCalc();
        System.out.print("请输入Java的成绩：");
        scoreCalc.Java=sc.nextInt();
        System.out.print("请输入C#的成绩：");
        scoreCalc.C =sc.nextInt();
        System.out.print("请输入DB的成绩：");
        scoreCalc.DB=sc.nextInt();
        int totalGrade=scoreCalc.sum(scoreCalc.Java,scoreCalc.C, scoreCalc.DB);
        double avg=scoreCalc.avg(scoreCalc.Java,scoreCalc.C, scoreCalc.DB);
        System.out.println("总成绩："+totalGrade);
        System.out.println("平均成绩："+avg);
    }
}
